package cn.dceast.service;

import cn.dceast.mapper.MessageMapper;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by yuxiang on 2017/1/11.
 */
@Service
public class MessageService {

    private static Logger logger = Logger.getLogger(MessageService.class);

    @Autowired
    MessageMapper messageMapper;

    /**
     * 新增留言
     * @param paramMap
     * @return
     */
    public int addMsg(Map paramMap){
        return messageMapper.addMsg(paramMap);
    }

    /**
     * 获取留言列表
     * @param paramMap
     * @return
     */
    public List<Map<String, Object>> getMsgListByCondition(Map paramMap){
        return messageMapper.getMsgListByCondition(paramMap);
    }

    /**
     * 获取留言详情
     * @param paramMap
     * @return
     */
    public Map<String, Object> getMsgInfoByCondition(Map paramMap){
        return messageMapper.getMsgInfoByCondition(paramMap);
    }
}
